<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            list-style: none;
        }

        ul {
            width: 900px;
            height: 200px;
            border: 1px solid;
            margin: 20px auto;
            overflow: hidden;
        }

        ul li {
            width: 150px;
            height: 200px;
            float: left;
            /* 过渡效果 */
            transition: width 0.5s;
        }

        ul:hover li{
            width: 100px;
        }

        ul li:hover {
            width: 400px;
        }

        ul li img {
            width: 400px;
        }
    </style>
</head>

<body>
    <ul>
        <li><img src="./images/ad7.jpeg" alt=""></li>
        <li><img src="./images/ad8.jpg" alt=""></li>
        <li><img src="./images/ad9.jpeg" alt=""></li>
        <li><img src="./images/ad10.jpg" alt=""></li>
        <li><img src="./images/ad11.jpg" alt=""></li>
        <li><img src="./images/ad12.jpg" alt=""></li>
    </ul>
</body>

</html>